import random


class Template:
    def __init__(self,lang):
        if lang == 'en':
            self.TEMPLATE = {
                'temp_yy': [
                    'With the continuous development of (specific field or technology), the competition in (related field or market) is becoming increasingly fierce.<sup>1</sup> In the face of this situation, (specific group or entity) must continuously improve (key ability or characteristic) and adopt various effective methods to address (specific problem or challenge) in order to stand out in the competition. <sup>2</sup>Therefore, enhancing (solution or capability) is not only extremely necessary but also an effective approach.<sup>3</sup><sup>4</sup>',
                    'In the context of (specific field or background), (a particular problem or challenge) has become a major factor hindering the development of (specific group or entity). To tackle this challenge, (specific group or entity) urgently needs to find innovative ways to (goal to be achieved or direction to be improved). Based on this, this study proposes (research methods or strategies), aiming to effectively solve (aforementioned problem or challenge) through (specific application of methods).',
                    'With the breakthroughs and developments in (specific technology or theory), (application field or industry) is facing unprecedented (challenges or opportunities). To seize these opportunities and overcome challenges, (specific group or entity) must explore (new methods or technologies) to optimize (existing processes or products). This study focuses on (specific goal or problem of the research) and proposes (a solution or method), which is expected to bring significant improvements to (application field or industry).',
                    'With the rapid development of the socio-economic landscape, (specific social problem or demand) has become increasingly prominent, posing a pressing issue for (specific social group or field) to address. In the face of this challenge, traditional methods alone are no longer sufficient to meet (the need or goal of solving the problem). Therefore, this study aims to explore the application of (innovative methods or new technologies) in (specific application scenarios) to find more effective solutions to address (specific social problem or demand).'
                ],

                'temp_ff': ['''
               Research Direction Overview:
               Research Direction One: Introduce the first research direction closely related to (article theme technology). This section will discuss in detail:

               Method One: Based on (reference document), introduce the technical details, application scenarios, and contributions of Method One to Research Direction One.<sup>1</sup>
               Method Two: Based on (reference document), explain the implementation principles, advantages, and practical performance of Method Two.<sup>2</sup>
               Research Direction Two: This section focuses on another research direction related to (article theme technology), including:

               Method One: Elaborate on the core algorithm, applicable conditions, and impact of this method in the research direction.<sup>3</sup>
               Method Two: Analyze the design ideas, effect evaluation, and challenges faced by this method.<sup>4</sup>
               Research Direction Three: Explore the third research direction, covering:

               Method One: Describe the basic framework, key technical points, and application achievements of the method in this field.<sup>5</sup><sup>6</sup>
               Method Two: Summarize the development background, implementation methods, and contributions of the method to related research.<sup>7</sup>
               ''', '''
               Thematic Research Direction Analysis:

               Thematic Research Direction One: Analyze the following methods related to the theme:
               Technical Method Overview: Introduce two main technical methods related to this research direction, emphasizing their theoretical basis and application value.
               Thematic Research Direction Two and Method Analysis: Discuss in detail the second research direction closely related to the theme, including the introduction and evaluation of two key technical methods.
               Other Related Research Directions: Briefly outline other research directions related to the theme and their representative technical methods.
               ''', '''
               Comparative Analysis of Research Directions and Technical Methods:

               Technical Comparison in Research Direction One: Introduce two technical methods in Research Direction One and conduct a comparative analysis, highlighting their respective advantages, limitations, and applicable scenarios.
               Method Evaluation in Research Direction Two: Evaluate the performance, efficiency, and future development potential of two different technical methods in Research Direction Two.
               Overview of Methods in Other Research Directions: Provide a quick overview of other research directions, focusing on the innovations and comparative advantages of each direction.
               These templates provide a structured framework for writing technical review articles, presenting research content in different ways to help authors clearly and systematically introduce the technical theme and its related research directions and methods.
               '''],

                'temp_tl': ['''
               Theme 1: Technical Methods in Research Direction One
               Significance: Elaborate on the importance of technical methods in Research Direction One, including how they solve specific problems and contribute to the related field.<sup>1</sup>
               Limitations: Discuss the limitations of these technical methods, including application constraints and potential areas for improvement.<sup>2</sup><sup>3</sup>
               Discussion: Based on the analysis of significance and limitations, propose future research directions, possible improvement methods, or new research opportunities.<sup>4</sup>
               Theme 2: Technical Methods in Research Direction Two
               Significance
               Limitations
               Discussion
               Summary
               In this section, summarize the key findings of each research direction, emphasizing the overall significance and common limitations of the technical methods. Also, provide suggestions and outlooks for future research.<sup>5</sup>
               ''', '''
               Theme 1: Thematic Research Direction One
               Significance: Explain the importance of this research direction in solving theme-related problems and how it promotes the development of the field.
               Limitations: Point out the limitations of the methods in this research direction and how these limitations affect the research outcomes.
               Discussion: Discuss how to overcome these limitations and the future development opportunities and challenges of this research direction.
               Theme 2: Thematic Research Direction Two
               Significance
               Limitations
               Discussion
               Summary
               Summarize the discussed themes, emphasizing the comprehensive significance of each research direction, pointing out the overall trends and key challenges in the theme research. Provide insights and suggestions for future research directions.
               ''', '''
               Theme 1: Comparative Analysis of Technical Methods in Research Direction One
               Significance: From a comparative perspective, elaborate on the advantages and characteristics of different technical methods in solving specific problems.
               Limitations: Analyze and discuss the limitations of each method and how these limitations impact practical applications.
               Discussion: Based on the comparative analysis, propose how to combine the strengths of different methods and possible future research directions.
               Theme 2: Method Evaluation in Research Direction Two
               Significance
               Limitations
               Discussion
               Summary
               Summarize all discussed themes, especially emphasizing the insights gained from the comparative analysis. Provide comprehensive suggestions for future research, including how to leverage the strengths of various technical methods to overcome existing limitations.
               '''],

                'temp_jl': [
                    'With the continuous development of (specific field or technology), the competition in (related field or market) is becoming increasingly fierce. In the face of this situation, (specific group or entity) must continuously improve (key ability or characteristic) and adopt various effective methods to address (specific problem or challenge) in order to stand out in the competition. Therefore, enhancing (solution or capability) is not only extremely necessary but also an effective approach.',
                    'In the context of (specific field or background), (a particular problem or challenge) has become a major factor hindering the development of (specific group or entity). To tackle this challenge, (specific group or entity) urgently needs to find innovative ways to (goal to be achieved or direction to be improved). Based on this, this study proposes (research methods or strategies), aiming to effectively solve (aforementioned problem or challenge) through (specific application of methods).',
                    'With the breakthroughs and developments in (specific technology or theory), (application field or industry) is facing unprecedented (challenges or opportunities). To seize these opportunities and overcome challenges, (specific group or entity) must explore (new methods or technologies) to optimize (existing processes or products). This study focuses on (specific goal or problem of the research) and proposes (a solution or method), which is expected to bring significant improvements to (application field or industry).',
                    'With the rapid development of the socio-economic landscape, (specific social problem or demand) has become increasingly prominent, posing a pressing issue for (specific social group or field) to address. In the face of this challenge, traditional methods alone are no longer sufficient to meet (the need or goal of solving the problem). Therefore, this study aims to explore the application of (innovative methods or new technologies) in (specific application scenarios) to find more effective solutions to address (specific social problem or demand).'
                ]
            }
        else:
            self.TEMPLATE = {
            'temp_yy': [
                '随着（具体领域或技术）的不断发展，（相关领域或市场）的竞争日趋激烈。面对这种局势，（特定群体或实体）想要在竞争中脱颖而出，必须不断提高（关键能力或特性），采取各种有效方法来改善（具体问题或挑战）。因此，增强（解决方案或能力）不仅是极为必要的，也是行之有效的方法。',
                '在（具体领域或背景）的背景下，（某个问题或挑战）已经成为阻碍（特定群体或实体）发展的主要因素。为了应对这一挑战，（特定群体或实体）亟需找到创新的方法来（解决的目标或提升的方向）。据此，本研究提出了（研究的方法或策略），旨在通过（方法的具体应用）来有效地解决（前述问题或挑战）。',
                '伴随着（具体技术或理论）的突破和发展，（应用领域或行业）面临着前所未有的（挑战或机遇）。为了把握这些机遇并克服挑战，（特定群体或实体）必须探索（新方法或新技术）来优化（现有流程或产品）。本研究着眼于（研究的具体目标或问题），提出了一种（解决方案或方法），预期能够为（应用领域或行业）带来显著的改进。',
                '随着社会经济的快速发展，（具体社会问题或需求）已经日益凸显，成为（特定社会群体或领域）亟待解决的问题。面对这一挑战，仅靠传统方法已难以满足（解决问题的需求或目标）。因此，本研究旨在探讨（创新方法或新技术）在（具体应用场景）中的应用，以期找到更有效的解决方案来应对（具体社会问题或需求）。'
            ],

            'temp_ff': ['''     
研究方向综述：
研究方向一：介绍与（文章主题技术）紧密相关的研究方向一。本节将详细讨论：

方法一：依据（参考文档），介绍方法一的技术细节、应用场景及其对研究方向一的贡献。
方法二：基于（参考文档），阐述方法二的实现原理、优势及其在实际应用中的表现。
研究方向二：本节聚焦于另一个与（文章主题技术）相关的研究方向，包括：

方法一：详述该方法的核心算法、适用条件及其在该研究方向上的影响。
方法二：解析该方法的设计思路、效果评估及其面临的挑战。
研究方向三：探讨第三个研究方向，涵盖：

方法一：描述方法的基本框架、关键技术点及其在该领域的应用成果。
方法二：概括方法的发展背景、实现方式及其对相关研究的推动作用。''', '''

面向主题的研究方向分析：

主题相关研究方向一：围绕该主题，分析包括但不限于以下方法：
技术方法概述：介绍与该研究方向相关的两种主要技术方法，强调其理论基础和应用价值。
主题相关研究方向二及方法分析：详细讨论与主题密切相关的第二个研究方向，包括两种关键技术方法的介绍和评价。
其他相关研究方向：简要概述其他几个与主题相关的研究方向，以及各自的代表性技术方法。
''', '''
研究方向与技术方法对比分析：

研究方向一的技术对比：介绍研究方向一中的两种技术方法，并进行对比分析，指出各自的优势、局限及适用场景。
研究方向二的方法评估：针对研究方向二，评估两种不同技术方法的性能、效率及未来发展潜力。
其他研究方向的方法概览：为读者提供其他几个研究方向的快速概览，着重介绍各方向的创新点及其对比优势。
这些模板为撰写技术综述文章提供了结构化的框架，通过不同的方式展现研究内容，旨在帮助作者清晰、系统地介绍技术主题及其相关的研究方向和方法。
    '''],
            'temp_tl': ['''
主题1：研究方向一的技术方法
意义：详细阐述研究方向一中技术方法的重要性，包括它们如何解决特定问题，以及对相关领域的贡献。
局限性：讨论这些技术方法存在的局限性，包括应用的限制、潜在的改进空间等。
讨论：基于意义和局限性的分析，提出未来研究方向、可能的改进方法或者新的研究机会。
主题2：研究方向二的技术方法
意义
局限性
讨论
总结
在本节中，概括各研究方向的关键发现，强调技术方法的整体意义和存在的通用局限性。同时，提出对未来研究的建议和展望。
''', '''
主题1：主题相关研究方向一
意义：解释该研究方向对解决主题相关问题的重要性，以及它如何推动领域发展。
局限性：指出研究方向中方法的局限性，以及这些局限性对研究成果的影响。
讨论：讨论如何克服这些局限性，以及这个研究方向未来的发展机会和挑战。
主题2：主题相关研究方向二
意义
局限性
讨论
总结
总结讨论的主题，强调各研究方向的综合意义，指出主题研究的整体趋势和关键挑战。提供对未来研究方向的见解和建议。
''', '''
主题1：研究方向一的技术对比
意义：从对比的角度阐述不同技术方法在解决特定问题上的优势和特点。
局限性：分析并讨论每种方法的局限性，以及这些局限性在实际应用中的影响。
讨论：基于对比分析，提出如何结合不同方法的优点，以及未来研究可能的方向。
主题2：研究方向二的方法评估
意义
局限性
讨论
总结
对所有讨论的主题进行总结，特别强调通过对比分析得出的见解。提出对未来研究的综合建议，包括如何利用各技术方法的优势来克服现有的局限性。
'''],
            'temp_jl': [
                '随着（具体领域或技术）的不断发展，（相关领域或市场）的竞争日趋激烈。面对这种局势，（特定群体或实体）想要在竞争中脱颖而出，必须不断提高（关键能力或特性），采取各种有效方法来改善（具体问题或挑战）。因此，增强（解决方案或能力）不仅是极为必要的，也是行之有效的方法。',
                '在（具体领域或背景）的背景下，（某个问题或挑战）已经成为阻碍（特定群体或实体）发展的主要因素。为了应对这一挑战，（特定群体或实体）亟需找到创新的方法来（解决的目标或提升的方向）。据此，本研究提出了（研究的方法或策略），旨在通过（方法的具体应用）来有效地解决（前述问题或挑战）。',
                '伴随着（具体技术或理论）的突破和发展，（应用领域或行业）面临着前所未有的（挑战或机遇）。为了把握这些机遇并克服挑战，（特定群体或实体）必须探索（新方法或新技术）来优化（现有流程或产品）。本研究着眼于（研究的具体目标或问题），提出了一种（解决方案或方法），预期能够为（应用领域或行业）带来显著的改进。',
                '随着社会经济的快速发展，（具体社会问题或需求）已经日益凸显，成为（特定社会群体或领域）亟待解决的问题。面对这一挑战，仅靠传统方法已难以满足（解决问题的需求或目标）。因此，本研究旨在探讨（创新方法或新技术）在（具体应用场景）中的应用，以期找到更有效的解决方案来应对（具体社会问题或需求）。'
            ]
        }


    def random_template_yy(self):
        self.TEMPLATE['temp_yy'][0], self.TEMPLATE['temp_yy'][-1] = self.TEMPLATE['temp_yy'][-1], \
                                                                    self.TEMPLATE['temp_yy'][0]
        return self.TEMPLATE['temp_yy'][0]

    def random_template_ff(self):
        self.TEMPLATE['temp_ff'][0], self.TEMPLATE['temp_ff'][-1] = self.TEMPLATE['temp_ff'][-1], \
                                                                    self.TEMPLATE['temp_ff'][0]
        return self.TEMPLATE['temp_ff'][0]

    def random_template_tl(self):
        self.TEMPLATE['temp_tl'][0], self.TEMPLATE['temp_tl'][-1] = self.TEMPLATE['temp_tl'][-1], \
                                                                    self.TEMPLATE['temp_tl'][0]
        return self.TEMPLATE['temp_tl'][0]

    def random_template_jl(self):
        self.TEMPLATE['temp_jl'][0], self.TEMPLATE['temp_jl'][-1] = self.TEMPLATE['temp_jl'][-1], \
                                                                    self.TEMPLATE['temp_jl'][0]
        return self.TEMPLATE['temp_jl'][0]
